package com.liu.repository;

import com.liu.domain.room;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by liu on 17-9-21.
 */
public interface RoomRepository extends JpaRepository<room,Integer> {

    @Query(value = "select * from room where build_id=?1", nativeQuery = true)
    List<room> findAllByBuild_id(int buildId);

}
